CXX :=g++ -std=c++11 -g -Wall
XFLAG := -pthread -ldl 
Ssrc :=$(wildcard ./src/Server/*.cpp)
Osrc :=$(wildcard ./src/Order/*.cpp)
Csrc :=$(wildcard ./src/Cooker/*.cpp)
Wsrc :=$(wildcard ./src/Waiter/*.cpp)
INC  :=$(wildcard ./include/*.h)
LIB  :=$(wildcard ./lib/*.a)
OBJ_DIR  :=./bin

.PHONY:server order waiter cooker clean

All:server order waiter cooker 

server:
	$(CXX) $(Ssrc) $(LIB) -o $(OBJ_DIR)/$@ $(XFLAG) 
order:
	$(CXX) $(Osrc) -o $(OBJ_DIR)/$@
waiter:
	$(CXX) $(Wsrc) -o $(OBJ_DIR)/$@
cooker:
	$(CXX) $(Csrc) -o $(OBJ_DIR)/$@ 

clean:
	rm $(OBJ_DIR)/* 
